!Tau

The Graph Preparation Package

v1.60

Copyright © Tim Birks 1993, 1994, 2000, 2001

GPL Freeware: for conditions of use, see the ReadMe file & gpl file.[1]

Current development Peter Killworth 2001-2006

Original manual layout & editing by Eddie Lord, with additional

text by by Terry Duell.

All later revisions by Peter Killworth.

Manual version 1.6 15 Jun 2006

Contents

Contents 2

Introduction 3

With thanks to: 3

Original editor's note (Eddie Lord BSc, eddielord@onetel.net.uk) 3

Important changes from version 1.50 3

Important changes from version 1.40 3

Important changes from version 1.30 3

Important changes from version 1.20 4

Important changes from version 1.10 4

Change list from version 1.10 4

Getting Started with !Tau 6

Starting !Tau 6

Default Style settings 6

Editing data 7

Special key presses 7

File types 8

!Tau Menu Structure 9

Main menu 9

Paper submenu 9

Graph submenu 11

Column submenu 15

Save submenu 19

Import submenu 20

Cells submenu 21

Reduce submenu 21

View Option 22

Global Edit 22

Quitting Tau 22

Examples 23

Example 1 23

Example 2 - The SIN function 23

Example 3 - Best fit facilities 24

Example 4 - Log or linear? 24

Example 5 - Using BASIC functions 1 25

Example 6 - Using BASIC functions 2 26

Example 7 - Bounds and presentations 26

Introduction

Tim wrote Tau because he needed to prepare x-y graphs for publication in scientific journals and reports. The alternative was a PC, Harvard Graphics, and sticky tape. Hence it is geared towards the production of a relatively small number of graphs with the maximum of user control over such niggly things as line thicknesses and dash patterns. Of course the results still leave scope for improvement, but that can always be done in !Draw. Note also the complete lack of junk such as pie charts and the like - if you want pie charts, you are probably in advertising or marketing, so go use Harvard :-).

This version of Tau was written in BBC Basic V on SAs with RISC OS 3.70 and 4.02. I no longer have an RO2 or 3.10 platform for testing; it will no longer work on RO2 (24-bit colour!) though it should work on 3.10. It is pretty complete. Tim Birks finished writing Tau in September 1993, but didn't release it until August 1994 because of its general bugginess. As far as we know, all the bugs have been fixed (!). If you have any constructive criticism, bug reports, or suggestions for features you think would be useful, please get in touch with the current developer.

Email: pystab@hotmail.com (Internet fashion)

Current development: Peter Killworth (p.killworth@noc.soton.ac.uk)

Snail: National Oceanography Centre, Southampton, Empress Dock, Southampton SO14 3ZH, United Kingdom.

With thanks to:

For the original version: Chris Pannell for suggestions, and for acting as a RISC OS 2 guinea pig. Alban Killingback for access to a RISC OS 2 machine; and the former denizens of room 328, where that machine was kept, for their patience.

Later in the development: various users, for reports of bugs and suggestions for improvements. Sebastian Barthel wrote part of 1.60.

Original editor's note (Eddie Lord BSc, eddielord@onetel.net.uk)

!Tau was first brought to my attention through an article in Archive magazine written by Terry Duell, (Archive 14.10 July 2001).

Not liking to work from readme files I thought it would be worth putting a small manual together with some screen shots. These I grabbed using !GrabMenu by Cy Booker (1992).

So here is the manual, based mainly on Tim's readme files. I have added addition comments where necessary. Additional words are by Terry Duell of !ARpM fame.

Many thanks to Terry Duell and to Paul Beverley of Archive for permission to use some of their material.

All later manual revisions by Peter Killworth.

Important changes from version 1.50

To speed up plotting, the user can click on a tick or a cross at the top of each spreadsheet column ('+' or '-' for anyone without the Selwyn font) to turn plotting on or off. If a symbol is being used as part of the plot it is also shown for convenience. The left-hand column (row number) has been widened for those users with lots of data.

Important changes from version 1.40

In 1.41 the ability to specify suffices k, M, G and T for thousands, millions, billions and, er, whatever comes next has been added.

In 1.50, the ability to specify colours in 24-bit modes is included. The user can specify colours for the line and/or character and/or fill for each set of y-values (already added in 1.30). In addition, the colour for the frame (axes, labels and annotations), for a possible background fill of the graph, and for the border and background colours of a possible graph key can also be chosen. In 256-colour modes (which are all that are available in 3.10), !Tau does what it can to represent the 24-bit colours, like any other application.

Important changes from version 1.30

A new feature has been added. While !Tau has always been able to plot multiple data with the same x-values, there are occasions, particularly when working with observed data, in which one has several sets of (x, y) data which need plotting on the same graph. In previous versions, the workaround has been to plot each pair separately and superimpose the graphs afterwards, which isn't very neat. In 1.40 one can turn on "Many Xs" which allows each y column of data to have a specific x column associated with it for all plotting purposes; they can all be plotted simultaneously.

Important changes from version 1.20

The resizable worksheet has been doubled in size again (assuming most users can cope with a 640k Wimpslot). With an eye towards computer presentations, where colour replaces linestyles, both lines and symbols can be in any desktop colour. Linestyles are now user-definable (lengths and gaps can be specified). The F3 key has been enabled for quick saves to Drawfiles. The best fit option now shows the equation for the fit, and the correlation. A facility for globally editing data has been added (useful if a certain data value has the meaning "no or missing data". The key now has a black rectangle around it, with a white background (so can be moved over the graph without any of the graph showing through).

Important changes from version 1.10

Actually, there are quite a few changes, like the resizable worksheet (with twice the previous capacity), and the Plot (many) option. The most significant change is that the TauFile and TauStyle formats are different. Old-type files can be read by Tau 1.20, but the new-type files cannot be read by Tau 1.10 and earlier versions. In other words, if you get rid of your old version of Tau there shouldn't be any problems.

Change list from version 1.10

1.60:

1.50:

1.41:

1.40:

1.30:

1.25:

Getting Started with !Tau

!Tau generates publication-quality graphs in the form of Draw files, ready to import into your favourite word-processor, computer presentation, or DTP. A data worksheet (16 columns by 4096 rows) can be filled by keying-in, importing from a file or files, and/or calculation. You determine line patterns and thicknesses, colours, text positioning and font sizes, etc. The data worksheet can be redimensioned, if you would prefer more rows of data for example.

Note that Tau does not (usually) draw graphs on the screen (Acorn's excellent Draw or similar applications will do that). In the following text, all references to 'drawing' or 'plotting' a graph refer to the construction of a Draw file.

The manual does assume some experience with graph drawing packages, common sense, and a willingness to suck-it-and-see. The jargon 'dbox' (short for 'dialogue box') will be used throughout.

Starting !Tau

Double click on the !Tau icon in a filer window, or double click on the icon of a file of type 082 (TauFile) or 083 (TauStyle). The Tau icon is installed on the icon bar, and the application's main window opens, showing the data worksheet (dark blue background) with labelling (grey background) along the top and left edges. If starting by a double click on a TauFile or TauStyle, that file is loaded into Tau. If starting by a double click on the !Tau icon itself, Tau looks for a TauFile or TauStyle called "Default" within the !Tau directory and loads that. If there is no such file, Tau starts with its worksheet empty and with minimal appearance data.

A portion of the worksheet window. The leftmost column is currently the x-values for the y-values in columns 1 and 2 (here called Y1 and Y2, though these are user choices). The highlighted entry can be edited. The ticks at thetop of columns 1 and 2 show that these will be plotted; the cross at column 2 shows that it will not. Clicking on the ticks or crosses changes the plot action accordingly. The filled circle at the top of column 1 is the symbol used for its plot.

Assuming there are no data initially (usually the case), then simply drag in a text file with some data columns, either to the worksheet (in which case it gets loaded with its 'top left hand corner' at the cursor position, which is always highlighted) or to the iconbar (in which case it gets loaded at the top left hand corner of the worksheet). Assuming the latter, and if the first of the columns represents the x-axis for your plot, and the remainder represent the y-axis (or y-axes if you wish to plot more than one simultaneously), then bringing up the save option on the main menu and saving as a drawfile will give you a publishable graph right away.

Default Style settings

There are three ways Tau can get its default settings when it is started. These include the graph style parameters, and also other things like whether the user is prompted if unsaved data is about to be lost (hidden, a little unhelpfully, in the Reduce menu from historical times), and whether Tau automatically scales your graph.

  1. If Tau is started by double clicking on a TauFile or TauStyle icon, the defaults are set to the values stored in the file.
  2. If Tau is started "empty", by double clicking on the !Tau icon, the defaults are obtained from a file called "Default" within the !Tau directory. If you would like to use your own set of defaults, just put them in a TauStyle file and save it as "Default" in the !Tau directory.
  3. If there is no file "Default" in the !Tau directory and Tau is started by double clicking on the !Tau icon, a set of default defaults from within the program is used.

Editing data

The data worksheet is arranged in 16 columns, each containing 4096 rows of cells. The cells can be filled with data by importing from a file (see below), by calculation (see below), or from the keyboard. Click on the appropriate cell with Select to set the caret and highlight the cell.

You can then edit the contents of the cell. Valid contents are:

If you click on a cell with Adjust, the caret does not move, but all the cells in a rectangle between the caret-cell and the cell you clicked on will highlight. Any action performed at the caret (followed by RETURN when entering a number) will then affect all these cells.

Tau keeps a note of the maximum row and column numbers for which data are held.

If you double click on a cell, that cell gains the caret and the whole column (down to the maximum row) will highlight. Double click with SHIFT to highlight a whole row instead. Values are displayed in cells to six significant figures.

Special key presses

RETURN - Reflect the value in the current cell in all highlighted cells, then move the caret down one row.

SHIFT-RETURN - As RETURN, but move the caret right one column.

CTRL-RETURN - Carriage return, move down one row, and to left most column.

LEFT/RIGHT - Move caret one character left/right. At the end of the characters the caret moves to the next cell.

DOWN/UP - Move caret down/up one cell.

SHIFT-LEFT/RIGHT - Extend or contract the highlighted block of cells.

SHIFT-DOWN/UP - Extend or contract the highlighted block of cells.

CTRL-DOWN/UP - Move caret to the last/first cell in a column.

TAB - Move caret right one cell, perform 'carriage return' if at the last column.

SHIFT-TAB - Move caret left one cell, perform 'reverse carriage return' if at the first column.

HOME - Move caret to the first cell in the worksheet.

SHIFT-COPY (or SHIFT-END) - Move caret to the bottom-right-most cell of a rectangle enclosing all cells containing data.

CTRL-U - Blank all highlighted cells.

BACKSPACE - Delete the character to the left of the caret within a cell.

DELETE - Same action as BACKSPACE.

SHIFT-DELETE - All highlighted cells in the same row as the caret are blanked, then all the values in the cells below these are scrolled up to 'fill the hole'.

INSERT - The values in all highlighted cells in the same row as the caret, and the cells below these, are scrolled down. A row of blank cells is inserted.

F3 - Does a quick save to a Drawfile.

Clicking on the tick or cross at the top of a column permits an instant change from plotting that column (a tick) to not plotting (a cross) without going through the plot menu for each column,

Note that click and drag is not available.

File types

Dragging files onto the main window (or the icon bar icon) starts a load action which depends on the filetype of the file dragged. These are:-

TauFile (082) - A TauFile file is a complete record of a previous state of Tau, and includes all the data in a worksheet and the variables governing the appearance of a graph. Dragging a TauFile onto Tau will restore the saved state, overwriting all of the current state.

TauStyle (083) - A TauStyle file is a TauFile file without any worksheet data. It replaces the variables governing the appearance of a graph, without overwriting the current data. It's like the 'template' files in other graph software, but the word 'template' already has a very particular meaning in RISC OS.

BASIC (ffb) - Has no immediate effect. Tau assumes any imported BASIC file to be a function library. You can then perform calculations on worksheet data using your own defined functions.

A simple example, Sinc, is provided with Tau - this contains a function FNsinc(x) which returns SIN(x)/x without generating an error at x=0. To avoid clashes with the program's internal FN definitions, do not use FN names beginning with capital 'T'. (See the examples section later.)

Text (fff), CSV (dfe) - Tau assumes files of these types contain textual data for import, either separated by spaces or commas, with row endings marked by one or more control characters (such a linefeed or carriage-return).

Import starts at the caret; data in cells not explicitly overwritten by new data are retained. Incidentally, Tau treats these files identically on import - e.g. the contents of a Text file can be comma separated. A blank cell can be marked by an isolated decimal '.', and a 'move' cell by 'M'. The Global Edit feature (below) allows for a specific value to be replaced by another throughout the data, which is useful if 999, or 1.E20, etc. are defined as "missing data".

The fact that import starts at the caret means that several datasets (presumably occupying separate columns!) can easily be imported by positioning the caret accordingly before dragging them into !Tau.

Other filetypes - action is normally as for Text (fff). But Tau first investigates whether the file might contain non-textual numerical data ("Binary data").

Such a file would be generated by, for example, the Basic PRINT# statement. Tau assumes that your file is "Binary data" if the first byte in the file is ascii &40, &80 or &88; no self-respecting file of textual data should contain any of these characters. Because there is no row-ending marker in such a file, Tau expects a special first datum in the file to be an integer specifying the number of data columns in one row. However, you can instead specify the number of columns in the Import dbox. Import starts at the caret; data not overwritten are retained.

!Tau Menu Structure

Main menu

Click Menu over the main window, gives the following items:

Paper - Leads to a submenu controlling the size and shape of a graph on the paper.

Graph - Leads to a submenu controlling the appearance of the whole graph. This includes such attributes as its scaling and the appearance of ticks and labels, and the number of rows and columns in the worksheet.

Column - Leads to a submenu controlling the treatment of an individual column of data. This includes control of the meaning of a column (use as X data, Y data, error bar data, or ignore), the appearance of a plot (whether to draw points, lines between points, etc.), and actions such as calculation and sort.

Save - Leads to a submenu allowing the saving of data in various ways. Clicking on the Save item in the Main menu will save the current Tau state as a TauFile, or generate an error if no pathname is specified yet. (F3 will do a quick save as a Drawfile.)

Import - Leads to a dialogue box. The first part governs the import of a file of Binary data (see above). The second part allows you to "weed" data being imported, reading in only 1 row of data for each n rows of data in the file.

Cells - A submenu, various ways of highlighting parts of the worksheet.

Reduce - A submenu, various ways to shrink your data, and disable the warning Tau gives when edited data is about to be lost or over-written.

View - Equivalent to clicking on the Tau icon in the left-hand corner, and produces a quick graph of the data.

Many Xs - A tickable item (click on the item to choose/unchoose it). When unticked, a single column of data (the leftmost one labelled "X" which has plotting enabled, in fact) serves as the x values for all current plots. When ticked, each set of y data can (and must) have an x-column associated with it, so that several datasets with different x values can be plotted simultaneously.

k,M,G labels - A tickable item (click on the item to choose/unchoose it). When unticked, numerical labels are plotted normally. When ticked, values over 1,000, 1 million, 1 billion and 1012 are replaced, respectively, with suffices k, M, G and T (so that 1.4E5 becomes 140k, etc.)

Global Edit - Leads to a dialogue box. The user can specify a data value and a replacement value, which are changed globally within the data when "OK" is clicked (or return pressed). Values can be changed to missing by specifying full stop (period) or leaving the value blank; values can also be set to "m" or "M" with the standard meaning (break the plot at this point).

The Main menu ("Many Xs" and "k,M,G labels" can be ticked)

Paper submenu

The items in this submenu lead to dialogue boxes. All dimensions are in points (1/72 inch) unless otherwise specified.

ä Size dbox. This governs the size and positioning, on paper, of the three main separate structures in a Tau graph. All sizes are in INCHES. (Aside, to any Euro-freaks: the 'inch' is a special Tau unit of length defined to be equal to 72 points. Happy now?)

The Graph Size dbox

ä Magnify dbox. The whole graph can be magnified (or shrunk) uniformly when saved as a Draw file. Enter the magnification factor here.

The Magnify dbox

Graph submenu

The items in this submenu lead to dialogue boxes. All dimensions are in points (1/72 inch) unless otherwise specified.

ä Scaling dbox. Governs the scaling of the graph. All dimensions refer to the data in the worksheet.

If a log scale is selected, you have several choices. Choosing any of the top four choices ("1, 1000"; "1, 10"; "1, 3, 10"; or "1, 2, 5, 10") gives you a logarithmic tick distribution. For example, if '1, 3, 10' is selected then ticks will be drawn at 0.1, 0.3, 1,3, 10,30... and so on. In all these cases labels only occur at 1, 10, 100 etc. Alternatively, choose the 'linear' settings, which put ticks at 1, 2, 3, 4, ..., 8, 9, 10, 20, 30, 40, ..., 80, 90, 100, 200, and so on. In this case, labels are put at 1, 2, and 5 in each decade.

The Scaling dbox

ä Frame dbox. Governs the axis structures to be drawn. All dimensions are in points.

The Frame dbox

ä Ticks dbox. Governs the appearance of axis/frame ticks. All dimensions are in points.

Tau supports two sets of ticks on each axis; major ticks usually being more prominent than minor ticks.

You can choose whether to plot a certain family of ticks at all.

Of course if you want ticks on the axes, then you will need to draw the axes in the first place.

Do this with Graph->Frame->Draw an X/Y axis.

The Ticks dbox

ä Grids dbox. Governs the appearance of grid lines. All dimensions in points. Grid lines are usually broken or dashed, so you choose the dash pattern. Grid lines are anchored to ticks, but you can omit the minor ticks.

The Grids dbox

ä Labels dbox. Governs the appearance and positioning of numerical labels on axes/frame. Labels can appear on axes and/or the frame.

The Labels dbox

ä Texts dbox. Governs the appearance of textual labels on axes/frames, such as a description of the quantity plotted along an axis.

The Texts dbox

ä Fonts dbox. There are usually two fonts in use in a Tau graph. You have to enter in their full names in this dbox.

The Fonts dbox

ä Worksheet dbox. This displays the current number of rows and columns in the data worksheet, and invites you to enter new values for either or both. If you enter a new value for just one, then the other will be given the maximum possible range. If you specify fewer rows than the current data, or if you change the number of columns at all, the current data will be forgotten! The maximum number of columns is 64.

The Worksheet Size dbox

Column submenu

ä Plot dbox. Governs the appearance of a column of Y 'data points'. All dimensions in points. Acts only on the column which includes the caret.

The Plot dbox for an x-axis, showing that the caret is in the X column. All options are greyed out except for the 'Plot this column' choice.

The Plot dbox for a y-axis, showing that the caret is in one of the Y columns. All options are available except in this case the 'Key text' is greyed out because a Key has not been selected in Paper->Size->Key. This column will be plotted with a lime-green fill, light blue lines, and red characters (because of the choices made, and because it has its "Plot this Column" box checked.

ä Meaning dbox. You decide the meaning to attach to the data in the column. A string summarising your choice is shown along the top of the worksheet for your information. Valid designations are:

When constructing a graph, Tau looks for the first occurrence of a given column meaning and ignores any others. For example, if you have two columns both designated 'X' (if "Many Xs" is not selected) or two designated 'X13' (if "Many Xs" is selected) the second will be ignored.

The Meaning dbox

ä Plot (many) dbox. This performs the actions of the "Plot" dbox on a number of columns, the parameters being set to the values for the current column (the one the caret is sitting in).

To determine which columns to act upon, type an appropriate string into the writable icon.

This string can be either:

The Plot Many dbox

ä Calculate dbox. The ability to fill columns in the worksheet by calculation is fundamental to using Tau.

To fill the highlighted area of the column with the results of a calculation, enter a valid BASIC expression.

For example, if you want to plot a graph of EXP(X) versus X, from -5 to 5 in 50 steps. Start with an empty worksheet. Highlight rows 0 to 50 in column 0.

In the Calculate dbox, enter the expression: (##-25)/5, to give values from -5 to 5. Double click on column 1 to highlight rows 0 to 50, then calculate: EXP(#0). Designate column 0 as 'X' and column 1 as, for example, 'Y1'.

You can define your own functions for use in calculations: write a BASIC library containing the FN definition, then drag the BASIC file onto the Tau main window. Tau will install the library. Make sure the function name doesn't begin FNT..., to guarantee no conflict with Tau's internal FN definitions.

A simple example 'Sinc' is included.

You can also use Calculate to copy or move data from one column to another - for example, to copy column 3, use the expression: #3.

The Calculate dbox

ä Best fit dbox. Performs linear/log regression (depending on whether X/Y log scales are currently selected) on X,Y data. If "many Xs" is not selected, these data are supplied by the selected rows of the data columns designated X and Yn respectively. If "Many Xs" is selected, the x-data relevant for Yn are used. You select the Yn to use - note this is NOT the column number, but the Y tag. The Y values given by the regression are then inserted into the highlighted columns. You can force the regression to pass through a given point (usually the origin). A window is opened for information showing the equation of the fit, and the correlation if this is relevant (i.e., if the regression has not been forced to pass through a given point). An error message is generated if only one cell is selected.

The best fit dbox

Note that the best fit can be used to fit:

ä Normalise. Finds the maximum absolute value in the highlighted area, then divides all highlighted cells by that value.

ä Sort. When the item is clicked, the highlighted rows across all columns are sorted in ascending order of the values in the highlighted column.

Save submenu

All items but one lead to a Save dialogue box.

ä Draw file F3. THIS IS THE PRIMARY OUTPUT OF TAU!!! Saving a Draw file initiates the construction of the graph as defined by the values in the worksheet and the various style variables. The resultant Draw file can be imported directly into other applications, or edited using !Draw; for example, if you want to combine several graphs onto one diagram. F3 does a quick save to a Draw file also.

ä Tau file. Makes a copy of the complete state of Tau in a file of type 082 (TauFile). However, information about any user function libraries currently in place is not saved.

The File dbox

The two styles of Tau file icons (small and large)

ä Tau style. The Tau equivalent of a graphics template file, to make it easier to produce a batch of graphs with the same style.

The Tau style icon

ä CSV data. Export data from the worksheet in the form of textual CSV (comma separated values). Export is influenced by the selections made in the Options dbox (see below).

ä Text data. Export data in the form of spaced text. Also uses Options dbox.

ä Binary data. Export numerical data in BASIC PRINT# format. This saves space. The first datum in the file is an integer indicating the number of columns the data spans. Also uses Options dbox.

ä Options dbox. This is a dbox of data export options. Choose to use an isolated point character '.' to mark blank cells, an 'M' character to mark 'move' cells, whether to export data in order of meaning (Y1, Y2, etc.) or not, whether to export the whole worksheet or just a highlighted selection, and whether to export the number of columns as the first datum when saving a Binary file.

The Options dbox

Import submenu

Controls the way a binary file is imported. It allows data to be weeded on import.

The Import dbox

Cells submenu

Allows a short way to select and highlight rows/column/ to top and 'to bottom', all based on the position on the caret.

The 'Down to' option selects all the cells from the top down to the row number selected using the selected column, i.e. the column with the caret in.

The Cells dbox

'All data' selects all the cells in the worksheet as might be expected.

Reduce submenu

Allows a short way to compact your data in the worksheet.

Weed retains every nth row, with the ability to use only the selected rows.

Compact will move up any data into blank rows.

Clear will delete ALL data. A warning is issued.

Warnings can be deselected if required. The last item on the menu also applies to the global warning 'Data in jeopardy. Proceed?' on quitting or overwriting data. This can be unticked if you feel confident.

The Reduce dbox

View Option

If you click on "View" in the main menu, or on the Tau icon in the top left corner, a window will open that displays the graph. This window has its own menu, which should be self-explanatory. The 'Auto-update' is useful when designing a style for later use.

Dragging any drawfile into Tau will open the View window to display that file.

Global Edit

If you click on the Global edit menu option....

The Global edit dbox

The 'change' item can only be a number (including E notation). What it is changed to can be another number, an M or m, or a period or space.

Quitting Tau

If you click on the Close icon of the main window, you do not actually leave Tau: clicking on the icon bar icon restores the main window unchanged. To quit Tau, select Quit from the icon bar menu.

Examples

Much of the text here was written by Terry Duell, and has been taken from Archive 14.10 July 2001.

Example 1

An example file is supplied with !Tau. Load by double clicking on the file 'Example'. Simply save the draw file to !Draw to view the result.

The border, frame and key are marked with their respective co-ordinates. All dimensions are in inches.

The result should look something like this...

Example 2 - The SIN function

If we want to graph the SIN function we don't need to import the data as it can be generated within Tau.

Let's graph the function from 0 to 360 degrees.

Click on the Tau icon, and a window is opened showing us a blank worksheet.

We want the x variable from 0 to 360, so click select on row 0 of column 0, then scroll down to row 360 and click adjust to highlight that part of the first column. Dragging is not available. :-(

To fill the column with x values, click <menu> within the window and choose Column->Calculate. The X column is filled with the row numbers by using ## and pressing return.

Now double click in column 1. This automatically highlights the column from row 0 to row 360.

Again choose Column->Calculate and enter SIN(RAD(#0)). This means convert the values in column 0 (#0) to radians then calculate the sin. This fills the column with the appropriate values.

We can now look at how we want the graph presented.

With column 1 selected (or at least one cell in column 1), we can choose Graph->Scaling from the menu, and set the value at the right on the x axis to 360, and the major ticks at 90, and the minors at 30. Auto scale should be deselected. (But do try it to see how it works - Autoscale is often a good way of initially setting up a graph).

Now select Column->Plot and choose 'plot this column' and deselect 'plot points'. To make it look nice, choose fill colour 1.

Now we choose Graph->Texts and fill in text for the x and y axis, and set the text size to 12. Choose Graph->Labels and set the size to 12. We can also set up grid lines with Graph->Grids.

Save the file as a draw file to !Draw.

The result should look like this...

Example 3 - Best fit facilities

Tau also allows you to do a line of best fit through your data.

We will assume that you have columns 0 and 1 filled with your x and y data. To fill column 2 with the best fit data, select column 2 by double clicking. Using Column->Best fit, ensure 'Y column 1' is shown in the dialog box and click OK. Column 2 is automatically filled with the best fit data. The equation of best fit is given in a dbox.

If only one cell is selected an error message appears; select the whole column.

You can then plot points for col 1 and draw a line for the data in col 2, producing the plot below. The points show the data, and the line shows the line of best fit. Note that a dashed line has been chosen with marks at each data point position.

Example 4 - Log or linear?

Tau will set the axes for log-log, or log-linear. (Its best fit option takes this into account: so a best fit to a log-log plot is a power law.)

The following plot shows spectral density, the amplitude and frequency data having been generated from acceleration-time history data by !RLab2 (a must-have application for technical/scientific computing and available on the Kosovo CD).

Both the X & Y axes have been set to Log scales via Graph->Scaling, with tick spacing at 1, 5, 10 selected.

Example 5 - Using BASIC functions 1

You can load and use your own functions to aid calculation of the data. !Tau includes a typical function 'Sinc'. This contains a function FNsinc(x) which returns SIN(x)/x without generating an error at x=0. Sinc is listed below:-

DEFFNsinc(x)

IFx=0 =1

=SIN(x)/x

To avoid clashes with the program's internal FN definitions, do not use FN names beginning with capital 'T'

To use this function, drop the file 'Sinc' onto the Tau iconbar icon. Go to the worksheet and set up a column for X with the row numbers entered. Set the caret on col 2, Y1. Go to Column->Calculate and enter the expression 'FNSinc(#0)' into the dialog box. Plot the results.

Example 6 - Using BASIC functions 2

Here is another simple example. Type into your favourite editor then save the file as 'recthyp'; file type FFB, (BASIC).

DEFFNrecthyp(x)

=(6^2)/x

Again, drop the file 'recthyp' onto the Tau iconbar icon. Go to the worksheet and set up a column for X with the row numbers entered. Set the caret on col 2, Y1. Go to Column->Calculate and enter the expression 'FNrecthyp(#0)' into the dialog box. Note what happens at x = 0! Plot the results.

Example 7 - Bounds and presentations

Finally, if a graph is to be shown in a presentation (e.g. with Photodesk's OHP) it needs much bolder line thicknesses (in fact, the 'thin' setting frequently becomes invisible when shown with data projectors). Here is an example of the simple function 1/(x + .001) against x between 0 and 1. The frame thickness is now 2, and the line thickness is 4 (and coloured red). This function is very large (1000) when x is zero, and including it would make the remainder of the graph too small to see. So a bound of 50 has been set in the scale dbox, together with major marks at 10 and minors at 5.




[1]  This software is Freeware, and has been released under version 2 of the Gnu GPL. This means that Tim Birks reserves all rights as author and copyright owner. However, you may use, copy, modify and distribute it freely, as are your rights under the GPL.